package com.santu.edu.supporter.config;

import com.santu.edu.supporter.interceptor.UserLoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author luoyaoqi
 * @createTime 2024/2/23
 * @description
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    /**
     * 注册自定义拦截器
     *
     * @param registry ·
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new UserLoginInterceptor())
/*                // 拦截地址
                .addPathPatterns("/edu/supporter/**")
                // 开放登录路径
                .excludePathPatterns("/api/userInfo/login")*/;
    }


}
